Entropy-ladder plateau: EdgeCodecFlavor selector + bgz17 OOB fix + SPO rung-ladder plan#494
Conversation
The AVX2/AVX-512 batch palette lookup uses an i32 gather with scale=2 over the u16 distance matrix, loading each lane's target u16 PLUS the following u16 into the high half (masked off). On the last valid index of dm_data (query==k-1, candidate k-1) that high half reads one u16 past the backing slice — an out-of-bounds read. Guard both the AVX2 and AVX-512 paths: when the row's worst-case over-read (row_offset + k, candidate k-1's high half) is not strictly inside dm_data, route the whole batch through the scalar path, which only ever touches row_offset + c. Affects at most the final row of a tight k×k matrix (<=1/k of queries). Adds test_batch_last_row_full_width regression: k=64 (exact multiple of both SIMD widths), last row, full-width batch including candidate k-1. https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
Adds canonical_node::EdgeCodecFlavor { CoarseOnly, CoarseResidue, Pq32x4 } and a
defaulted ClassView::edge_codec_flavor(class) selector, so a class/schema picks
how its 16-byte EdgeBlock (+ optional value-slab residue) is interpreted.
Iron invariant (tested): the flavor is INTERPRETATION, not layout — every variant
leaves NODE_ROW_STRIDE = 512 untouched, so adopting one needs no
ENVELOPE_LAYOUT_VERSION bump (canon "registry-resolved via classid -> ClassView").
Default CoarseOnly matches the all-zero bootstrap reading. The trait method is
defaulted, so RegistryClassView inherits it (non-breaking); per-class override is
follow-up wiring in lance-graph-ontology.
Encode/measure kernels live in ndarray (hpc::edge_codec + hpc::reliability,
commit d3b608f) per the hardware/thinking split. Board: LATEST_STATE contract
inventory + AGENT_LOG updated in this commit (mandatory board hygiene).
+3 tests; contract lib 609 green; clippy -D warnings clean.
https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
Plan doc capturing the shipped entropy-ladder foundation (R1) and the sequenced roadmap (R2–R6 + COCA), all anchored on the Staunen↔Wisdom entropy coordinate (syntax→semantics→pragmatics). Records the locked architecture decisions: read the 3×palette256 SPO already in CausalEdge64 (no re-quant), Pearl 2³ = the 8 SPO iterations, flavors/classes are interpretation not layout, COCA pruning bundles identities not PQ codes (I-VSA-IDENTITIES). Board hygiene (same commit): INTEGRATION_PLANS prepend + STATUS_BOARD D-EL-1..6 + D-EL-COCA rows. https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
|
Warning Review limit reached
More reviews will be available in 59 minutes and 51 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Plateau — entropy-ladder SPO rung decomposition (lance-graph half)
Matched pair with the AdaWorldAPI/ndarray PR (the math/codec foundation). This is the lance-graph half: the per-class selector, a memory-safety fix, and the plan capturing the shipped work + the R2–R6 roadmap.
Delivered
EdgeCodecFlavorselector (lance-graph-contract):{CoarseOnly, CoarseResidue, Pq32x4}+ a defaultedClassView::edge_codec_flavor(class)— the class→schema mapping that picks how a node's 16-byte edge block is interpreted. Iron invariant (tested): flavor is interpretation, not layout — every variant leavesNODE_ROW_STRIDE = 512untouched, so noENVELOPE_LAYOUT_VERSIONbump (canon "registry-resolved viaclassid → ClassView"). Non-breaking: the trait method is defaulted, soRegistryClassViewinherits it.i32gather (scale 2) over theu16distance matrix, over-reading oneu16pastdm_dataon the final row/entry. Both paths now route the worst-case row to the scalar path. +regression test.Plan (the plateau record)
.claude/plans/entropy-ladder-spo-rung-v1.md— the Staunen↔Wisdom entropy coordinate that unifies the SPO rungs, NARS truth, and syntax→semantics→pragmatics; the shipped foundation (R1); and the sequenced roadmap: R2 storeentropy_classin CausalEdge64 spare bits (version-gated), R3 CAM-PQ AMX assignment, R4 helix-basin probe, R5 Markov rung-ladder probe, R6 energy axis / particle↔wave, COCA superposition pruning. Board updated in the same commit (INTEGRATION_PLANS + STATUS_BOARD D-EL-1..6 + D-EL-COCA).Tests
contract 609 lib green (+3 flavor tests); bgz17 simd 6 green (+1 regression);
clippy -D warningsclean.Architecture decisions locked
CausalEdge64— no re-quantization.https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
Generated by Claude Code